<?php

namespace App\Exceptions;

use Exception;

class ServiceException extends Exception
{
    //
    protected $code;

    protected $message;


    public function __construct($data)
    {
        $this->setCode($data['code']);
        $this->setMessage($data['msg']);
    }

    /**
     * @param mixed $code
     */
    public function setCode($code)
    {
        $this->code = $code;
    }

    /**
     * @param mixed $message
     */
    public function setMessage($message)
    {
        $this->message = $message;
    }
}
